﻿using System;
using System.Collections.Generic;
using System.Xml.Serialization;

namespace PortableVersion.Core.FileSystem.Services
{
    public enum ConflictAction { Ignore, Overwrite, Merge, Manual }
    public class ConflictItem
    {
        [XmlAttribute]
        public string MetaKey { get; set; }

        [XmlAttribute]
        public string SourcePath { get; set; }

        [XmlAttribute]
        public string TargetPath { get; set; }

        [XmlAttribute]
        public DateTime MonitoredTime { get; set; }

        [XmlAttribute]
        public ConflictAction ActionTaken { get; set; }

        [XmlAttribute]
        public Guid Id { get; set; }

        public ConflictItem()
        {
            Id = new Guid();
        }
    }

    public class ConflictState
    {
        [XmlArray]
        public List<ConflictItem> Items { get; set; }

        public ConflictState()
        {
            Items = new List<ConflictItem>();
        }
    }
}
